<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<% String path = request.getContextPath()+"/"; %>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<base href="<%=path%>">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>登录</title>

    <!-- Bootstrap Core CSS -->
    <link href="statics/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="statics/css/sb-admin-2.css" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="statics/Font-Awesome-4.3.0/css/font-awesome.min.css"/>
	<link href="statics/css/waitMe.min.css" rel="stylesheet">

</head>

<body class="waitMe_body" style="background:url(statics/img/14896.jpg) no-repeat center top;">
<div class="waitMe_container img" style="background:#fff">
    <div style="background:url('statics/img/loading.gif')"></div>
 </div>

    <div class="container" >
    	<c:if test="${requestScope.error == 'loginError'}">
    		<div class="alert alert-danger" role="alert" style="text-align: center;margin-top: 20px">用户名或密码不正确！</div>
    	</c:if>
    	<c:if test="${requestScope.error == 'captchaEmpty'}">
    		<div class="alert alert-danger" role="alert" style="text-align: center;margin-top: 20px">请输入验证码！</div>
    	</c:if>
    	<c:if test="${requestScope.error == 'captchaError'}">
    		<div class="alert alert-danger" role="alert" style="text-align: center;margin-top: 20px">验证码不正确！</div>
    	</c:if>
    	
    	
        <div class="row">
            <div class="col-md-4 col-md-offset-4" >
                <div class="login-panel panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">请登录</h3>
                    </div>
                    <div class="panel-body">
                        <form role="form" action="login" method="post">
                            <fieldset>
                                <div class="form-group">
                                    <input class="form-control" placeholder="请输入用户名" name="username" type="text" autofocus>
                                </div>
                                <div class="form-group">
                                    <input class="form-control" placeholder="请输入密码" name="password" type="password" value="">
                                </div>
                                <div class="form-group">
                                	<div class="row">
                                		<div class="col-md-6"><input class="form-control" placeholder="验证码" name="captcha" type="text" ></div>
  										<div class="col-md-6"><img id="img_captcha" src="images/kaptcha.jpg" alt="验证码" class="img-rounded" style="width: 100%"></div>
                                	</div>
                                	<div class="row">
                                		<div class="col-md-6"></div>
  										<div class="col-md-6" style="padding-top: 7px"><a href="javascript:refreshCaptcha();" role="button" class="btn btn-info btn-xs">看不清楚？</a></div>
                                	</div>
                                </div>
                                <input class="btn btn-lg btn-success btn-block" type="submit" value="登录">
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- jQuery -->
   <script src="statics/js/jquery-2.1.4.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="statics/js/bootstrap.min.js"></script>

   <script src="statics/js/waitMe.min.js"></script>
	<script type="text/javascript">
	function refreshCaptcha(){
		$("#img_captcha").attr("src","images/kaptcha.jpg?t=" + Math.random());
	}
	</script>
</body>

</html>
